local raidBuffs = CreateFrame('frame', "Raid Buffs", UIParent)
raidBuffs:SetPoint("TOPRIGHT", UIParent, "TOPRIGHT", -20, -2)
raidBuffs:SetSize(20, 20)

local potentialBuffs = {
	['Stats'] = {'Lone Wolf: Power of the Primates', 'Legacy of the White Tiger', 'Bark of the Wild', 'Blessing of Kongs', 'Embrace of the Shale Spider', 'Strength of the Earth', 'Blessing of Kings', 'Legacy of the Emperor', 'Mark of the Wild'},
	['Stamina'] = {'Lone Wolf: Fortitude of the Bear', 'Blood Pact', 'Commanding Shout', 'Invigorating Roar', 'Qiraji Fortitude', 'Savage Vigor', 'Sturdiness', 'Power Word: Fortitude'},
	['Mastery'] = {'Lone Wolf: Grace of the Cat', 'Blessing of Might', 'Grace of Air', 'Keen Senses', 'Plainswalking', 'Roar of Courage', 'Spirit of Beast Blessing', 'Power of the Grave'},
	['Crit'] = {'Lone Wolf: Ferocity of the Raptor', 'Dalaran Brilliance', 'Arcane Brilliance', 'Embrace of the Shale Spider', 'Fearless Roar', 'Furious Howl', 'Still Water', 'Strength of the Pack', 'Terrifying Roar', 'Leader of the Pack', 'Legacy of the White Tiger'},
	['Haste'] = {'Lone Wolf: Haste of the Hyena', 'Crackling Howl', 'Energizing Spores', 'Savage Vigor', 'Speed of the Swarm', 'Grace of Air', 'Mind Quickening', "Swiftblade's Cunning"},
	['Multistrike'] = {'Lone Wolf: Quickness of the Dragonhawk', 'Breath of the Winds', 'Double Bite', 'Wild Strength', 'Dark Intent', 'Mind Quickening', "Swiftblade's Cunning", 'Windflurry'},
	['Versatility'] = {'Lone Wolf: Versatility of the Ravager', 'Chitinous Armor', 'Defensive Quills', 'Indomitable', 'Strength of the Earth', 'Tenacity', 'Wild Strength', 'Inspiring Presence', 'Mark of the Wild', 'Sanctity Aura', 'Unholy Aura'},
	['Spell Power'] = {'Lone Wolf: Wisdom of the Serpent', 'Dalaran Brilliance', 'Arcane Brilliance', 'Dark Intent', 'Qiraji Fortitude', "Serpent's Cunning", 'Still Water', 'Lone Wolf: Wisdom of the Serpent'},
	['Attack Power'] = {'Battle Shout', 'Horn of Winter', 'Trueshot Aura'}
}

local index = 0
local lastframe = nil
local textFrames = {}
for k, v in pairs(potentialBuffs) do
	index = index + 1;
	local text = raidBuffs:CreateFontString(nil, "OVERLAY", "GameFontNormal")
	text:SetFont("Interface\\AddOns\\IshtaraMedia\\IshtaraMedia\\fonts\\pf_tempesta_five.ttf", 8, "OUTLINE,MONOCHROME")
	text:SetTextColor(.4, .4, .4)
	text:SetShadowColor(0,0,0,0)
	text:SetText(k)
	
	if (index == 1) then
		text:SetPoint("RIGHT", raidBuffs, "RIGHT", 0, 0)
	else
		text:SetPoint("RIGHT", lastframe, "LEFT", -10, 0)
	end
	
	lastframe = text
	textFrames[k] = text
end

raidBuffs:RegisterEvent("UNIT_AURA")
raidBuffs:SetScript("OnEvent", function(arg1, arg2, unit)
	if (unit == "player") then
		for k, v in pairs(potentialBuffs) do
			local found = false
			for u = 1, #v do
				local name = select(1, UnitBuff('player', v[u]))
				if (name) then
					found = true
				end
			end
			
			if (found) then
				textFrames[k]:SetTextColor(1, 1, 1)
			else
				textFrames[k]:SetTextColor(.4, .4, .4)		
			end
		end
	end
end)